home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 051-075 / 074 / less / makefile < prev    next >
Makefile  |  1995-03-13  |  4KB  |  149 lines

  1. # Makefile for "less"
  2. #
  3. # Invoked as:
  4. #       make all
  5. #   or  make install
  6. # Plain "make" is equivalent to "make all".
  7. #
  8. # If you add or delete functions, remake funcs.h by doing:
  9. #       make newfuncs
  10. # This depends on the coding convention of function headers looking like:
  11. #       " \t public <function-type> \n <function-name> ( ... ) "
  12. #
  13. # Also provided:
  14. #       make lint       # Runs "lint" on all the sources.
  15. #       make clean      # Removes "less" and the .o files.
  16. #       make clobber    # Pretty much the same as make "clean".
  17.  
  18.  
  19. ##########################################################################
  20. # System-specific parameters
  21. ##########################################################################
  22.  
  23. # off_t is the type which lseek() returns.
  24. # It is also the type of lseek()'s second argument.
  25. off_t = long
  26.  
  27. # TERMIO is 1 if your system has /usr/include/termio.h.
  28. # This is normally the case for System 5.
  29. # If TERMIO is 0 your system must have /usr/include/sgtty.h.
  30. # This is normally the case for BSD.
  31. TERMIO = 0
  32.  
  33. # SIGSETMASK is 1 if your system has the sigsetmask() call.
  34. # This is normally the case only for BSD 4.2,
  35. # not for BSD 4.1 or System 5.
  36. SIGSETMASK = 0
  37.  
  38.  
  39. ##########################################################################
  40. # Optional and semi-optional features
  41. ##########################################################################
  42.  
  43. # REGCMP is 1 if your system has the regcmp() function.
  44. # This is normally the case for System 5.
  45. # RECOMP is 1 if your system has the re_comp() function.
  46. # This is normally the case for BSD.
  47. # If neither is 1, pattern matching is supported, but without metacharacters.
  48. REGCMP = 0
  49. RECOMP = 0
  50.  
  51. # SHELL_ESCAPE is 1 if you wish to allow shell escapes.
  52. # (This is possible only if your system supplies the system() function.)
  53. SHELL_ESCAPE = 0
  54.  
  55. # EDITOR is 1 if you wish to allow editor invocation (the "v" command).
  56. # (This is possible only if your system supplies the system() function.)
  57. # EDIT_PGM is the name of the (default) editor to be invoked.
  58. EDITOR = 1
  59. EDIT_PGM = "ed"
  60.  
  61. # ONLY_RETURN is 1 if you want RETURN to be the only input which
  62. # will continue past an error message.
  63. # Otherwise, any key will continue past an error message.
  64. ONLY_RETURN = 0
  65.  
  66.  
  67. ##########################################################################
  68. # Compilation environment.
  69. ##########################################################################
  70.  
  71. # LIBS is the list of libraries needed.
  72. #LIBS = -ltermcap
  73. LIBS = -lc
  74.  
  75. # INSTALL_LESS is a list of the public versions of less.
  76. # INSTALL_MAN is a list of the public versions of the manual page.
  77. INSTALL_LESS =  /usr/local/less
  78. INSTALL_MAN =   /usr/man/manl/less.l
  79.  
  80. # OPTIM is passed to the compiler and the loader.
  81. # It is normally "-O" but may be, for example, "-g".
  82. OPTIM = 
  83.  
  84.  
  85. ##########################################################################
  86. # Files
  87. ##########################################################################
  88.  
  89. SRC1 =  io.c main.c option.c prim.c
  90. SRC2 =  ch.c position.c input.c output.c screen.c \
  91.     prompt.c line.c signal.c help.c ttyin.c command.c version.c
  92. SRC =   $(SRC1) $(SRC2)
  93. OBJ =   io.o main.o option.o prim.o ch.o position.o input.o output.o screen.o\
  94.     signal.o prompt.o line.o help.o ttyin.o command.o version.o
  95.  
  96.  
  97. ##########################################################################
  98. # Rules
  99. ##########################################################################
  100.  
  101. DEFS = -Damiga=1 -DTERMIO=$(TERMIO) \
  102.     -DSIGSETMASK=$(SIGSETMASK) \
  103.     -Doff_t=$(off_t)\
  104.     -DREGCMP=$(REGCMP) -DRECOMP=$(RECOMP) \
  105.     -DSHELL_ESCAPE=$(SHELL_ESCAPE) \
  106.     -DEDITOR=$(EDITOR) -DEDIT_PGM=$(EDIT_PGM) \
  107.     -DONLY_RETURN=$(ONLY_RETURN)
  108.  
  109. CFLAGS = $(OPTIM) $(DEFS)
  110.  
  111.  
  112. all: less
  113.  
  114. less: $(OBJ)
  115.     ln $(OPTIM) -o less $(OBJ) $(LIBS)
  116.  
  117. ram:
  118.     copy df0:lib to ram:
  119.     set CLIB=ram:
  120.  
  121. install: install_man install_less
  122.  
  123. install_man: less.l
  124.     for f in $(INSTALL_MAN); do  rm -f $$f; cp less.l $$f;  done
  125.     touch install_man
  126.     
  127. install_less: less
  128.     for f in $(INSTALL_LESS); do  rm -f $$f; cp less $$f;  done
  129.     touch install_less
  130.  
  131. $(OBJ): less.h funcs.h
  132.  
  133. lint:
  134.     lint -hp $(DEFS) $(SRC)
  135.  
  136. newfuncs:
  137.     mv funcs.h funcs.h.OLD
  138.     awk -f mkfuncs.awk $(SRC) >funcs.h
  139.  
  140. clean:
  141.     rm -f $(OBJ) less
  142.  
  143. clobber:
  144.     rm -f *.o less install_less install_man
  145.  
  146. shar:
  147.     shar -v INSTALLATION less.l makefile.* *.h *.awk $(SRC1) > less.shar.a
  148.     shar -v $(SRC2) > less.shar.b
  149.